<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        div{
            width: 100px;
            height: 100px;
            background-color: black;
            border: 2px dashed red;

            animation: test2 3s linear;
            /* animation: test1 2s linear; */
        }

        @keyframes test1 {
            from{
                width: 100px;
                height: 100px;
                background-color: black;
            }
            to{
                width: 200px;
                height: 200px;
                background-color: white;
            }
        }

        @keyframes test2 {
            0%{
                width: 100px;
                height: 100px;
                background-color: black;    
            }
            25%{
                width: 100px;
                height: 300px;
                background-color: skyblue;
            }
            66%{
                width: 300px;
                height: 300px;
                background-color: violet;
            }
            100%{
                width: 360px;
                height: 360px;
                background-color: gray;
            }
        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>